Pokemon XD PC port
==================

Start "Pokemon XD.exe". It opens the launcher: choose your disc image, how you want to play, your
controls and mods, then press Play.

You need your own copy of Pokemon XD: Gale of Darkness (USA version, game ID GXXE01) as a disc image
file (.iso, .rvz, .gcm, ...). Nothing from the game comes with this program, and your disc image is
never changed.

The "Original" preset plays exactly like the GameCube game. Every improvement is a setting you can
switch on in the launcher (Settings page).

Where your things are kept
--------------------------
Settings, mods, the memory card (your save), logs and the icon made from your disc are kept in
    %APPDATA%\Pokemon XD
(type that into the address bar of a File Explorer window to open it). Deleting this program's folder
doesn't touch them.

Portable use (everything inside this folder instead, for example on a USB stick): put a file named
data_location.json next to "Pokemon XD.exe" containing
    {"version": 1, "mode": "portable"}
Your things are then kept in the "portable" folder next to it. (The same file inside the "game"
folder works too; its portable folder is then game\portable.)

Shortcuts
---------
The launcher's Disc page has "Create Start menu shortcut" and "Create desktop shortcut". They point to
"Pokemon XD.exe" and use an icon made from your own disc. If you move this folder, make them again.

The "game" folder
-----------------
Holds the game (xd.exe), the launcher (xd_launcher.exe), the libraries they use, the launcher's font
and the licences of the parts made by others (game\licenses). Keep it next to "Pokemon XD.exe".
You can also start xd.exe directly by dragging your disc image onto it; it uses the same settings.

Updates
-------
The launcher can look for a newer version (Disc page, "Version and updates"), but only if you want it
to: it asks you once, and even then it asks again before downloading anything. A new version is
installed into its own folder next to "game" (for example "game-1.2.0"); the one you had stays, and
the Disc page can go back to it. Your saves, settings and mods are not touched by an update.

Problems
--------
In the game, F10 writes a bug report (screenshot, log, settings, the button presses that led there) into
%APPDATA%\Pokemon XD\reports. A crash or a freeze writes one by itself. The launcher's Reports page
lists them; "Export..." saves one as a .zip file, with a name and in a place you choose, to send
yourself. Nothing is ever sent anywhere by the program.

Public beta 0.4.2
=====================
Thank you for trying it! This is a beta: expect bugs, and keep a copy of your save.
Questions, bug reports, other players: https://discord.gg/XVbDVXH4Pn

New in 0.4.2 (bug fixes)
------------------------
- Pick any of your saves right at Continue: with more than one save, CONTINUE on the title screen shows
  all of them with a picture of where you saved, the trainer, play time and the rules of that save. One
  save: Continue works as before.
- Shadow Pokemon's moves showed as blank rows in the move menu: fixed (they show their Shadow moves again).
- Randomizer together with Gen 4: no more "mod conflict" window for the game's own parts.
- Ditto and Dialga from Battle Revolution now come with their full detail and shine ("make again" in the
  launcher's Extra assets page to update models made before).
- Randomizer: TM descriptions fit their box.
- After choosing randomizer / Gen 4 / mods on the New Game screen the game restarts straight into New Game,
  without the logos and title menu.
- First start of the launcher: it asks how you want to play (Original or Enhanced). Enhanced is the
  default of a new install; players who already have settings keep them.

New in 0.4.1
------------
- Gen 4 Pokemon (107 of them, Turtwig to Arceus) for a NEW playthrough: if you own Pokemon Battle
  Revolution (Wii, USA), the launcher's Extra assets page now makes the Gen 4 pack too ("Make models and
  Gen 4 pack", about half a minute). Then choose "Gen 4 Pokemon and rules" on the New Game screen. They
  have their own models, faces, cries, level-up moves and evolutions (Gible -> Gabite -> Garchomp,
  Piloswine -> Mamoswine...); Magnezone and Probopass evolve by Thunder Stone. Many Gen 4 moves work as in
  Diamond and Pearl (Close Combat, U-turn, Stealth Rock, Gravity, Healing Wish, Sucker Punch...), and so
  do their abilities (Solar Power, Dry Skin, Motor Drive, Technician, Mold Breaker, Download...). Your save
  stays tied to the pack: without it, the game says so and leaves the save alone. Without Gen 4 chosen, the
  game is exactly as before.
- In a Gen 4 playthrough: Leafeon (Leaf Stone) and Glaceon (Ice Stone), both offered with the other stones
  at the start; Weavile, Gliscor and Chansey by levelling up holding Razor Claw, Razor Fang, Oval Stone;
  Gallade, Froslass, Honchkrow, Mismagius, Togekiss, Roserade by the Dawn, Dusk and Shiny Stones; the
  Linking Cord does trade evolutions (Electivire, Magmortar, Rhyperior, Porygon-Z, Dusknoir, and XD's own
  Alakazam, Machamp, Golem, Gengar...). All those items, and TM51 to TM92 from Diamond and Pearl, are
  prizes at the Poke Coupon exchange. Older Pokemon can learn the TMs they could learn in Diamond and Pearl.
- Gen 4 Pokemon at the Poke Spots (a New Game choice with Gen 4): each spot keeps its own Pokemon and adds
  Gen 4 ones that fit it, with a starter as a rare find (Chimchar, Turtwig, Piplup).
- Randomizer: "Include Gen 4 Pokemon" (needs the Gen 4 pack). Older randomizer codes give the same game
  as before.
- The Battle Revolution converter is part of the program now (no Python): the 388 models take seconds.
- Updates on Linux and the Mac too (the launcher asks first, as on Windows).
- Linux: the launcher's backgrounds are drawn from your disc.
- For modders: script mods (Lua) and mods that add new Pokemon, moves and items (docs/MODDING.md).
- Fixed: a crash during some move animations with frame rate 60 ("draw vertex data overrun"); a rare
  crash when closing the window on Windows.

New in 0.4.0
------------
- MODS on the title screen: switch mods on or off and set their order inside the game (Apply restarts
  to the title with the new set; your saves keep the mods they were made with).
- Battle Revolution models (Windows and Linux; Mac new and untested): if you own Pokemon Battle Revolution (Wii, USA), the
  launcher's new Extra assets page turns your disc's Pokemon into models this game can show (about 3-5
  minutes, once). Then switch on "Battle Revolution models" in Settings. Built in, not a mod.
- Randomizer: shops (off, shuffled, everyday goods, anything), random move tutor moves, Poke Spot options,
  TM descriptions that fit their box.
- Physical/special split (Settings, off unless you turn it on): Attack or Sp. Atk follows the move, as
  from Diamond and Pearl on.
- Fast-forward and fast battle animations: the sound plays faster at its own pitch (no more squeaky
  sound), and on a PC that can't keep up they slow down to what it manages instead of stuttering.
- Controllers: Nintendo controllers go by the letters printed on them (A is A); a second controller takes
  over from a built-in one (Steam Deck); two-player setups stay as they are.
- Linux launcher (Disc, Extra assets, Settings, Controls, Save, Mods, Reports); on the Mac the app now
  opens the launcher (new, not yet run on a Mac).
- Fixed: long streaks across the screen in Extreme Speed, Fly, confusion stars and electric moves;
  Flamethrower shooting straight up; the move tutor; the SETTINGS button on top of the VS MODE menu.

New in 0.3.6 (fixes after the first days in public)
---------------------------------------------------
- Mac: the game stopped after a few minutes of play ("no memory below 2 GB for a task's stack"). Its
  working memory is now kept for it from the start. Quitting no longer ends in a crash message.
- Disc images of the shrunk ".nkit.iso" kind no longer get the "content is different from a known-good
  copy" warning: the game says that such a copy cannot be compared, and starts.
- The log no longer says "STUCK" while a message window is waiting for you.

New in 0.3.5
------------
- Several saves and a save manager: the launcher's Save page keeps more than one playthrough. The circle
  in front of a save chooses the one the game loads; click a save to see what is on it, rename it, look
  at its backups and restore one.
- Slow PCs: the sound engine needs about a quarter of the processor time it did; the sound holds up
  better when pictures take long; fast-forward switches itself off (with a line on the screen) when the
  PC cannot keep up. Play logs now say how hard the PC is working: if the game runs slowly on yours,
  a report (F10) after a few minutes of play helps us a lot.
- Sound: the GameCube sound chip's built-in routines were compared with a real console's and are equal.
- More of the GameCube's own timing is modelled (how long the console takes to load and set up a scene).
  It is NOT switched on yet: it stays off until it is proven.
- Linux and Mac builds exist as separate downloads (Linux: test build; Mac: untested).

Earlier (0.3.0)
---------------
- New Game setup screen (not in the "Original" preset): after the game's NEW GAME you choose how this
  playthrough is played - Faithful or Enhanced, a randomizer, challenge rules. The choice is kept with
  the save. If a save's choice and your settings differ later, CONTINUE asks which one you want.
- Randomizer: Light, Classic or Chaos, or Custom with every switch its own row (wild Pokemon, trainers,
  Shadow Pokemon, items, which move each TM teaches, trainers' levels / held items / natures ...). Each
  randomized game has a code you can share: the same code makes the same game. The game starts again
  by itself once when you pick one.
- Challenge runs: "No items in battle", Nuzlocke ("fainted is lost": it goes to the last PC box and
  can't come back; one catch per area) and level caps (no experience past the next boss's highest level).
- Frame rate 60 (Settings; 30 is the default): in-between pictures make 3D motion smoother. The game
  itself still runs exactly as at 30. Menus and text are not smoothed yet.
- Fixed: memory use now follows the GameCube's in more places (four real bugs found on the way).
Known in the new parts: a few randomized TM descriptions are cut off at the box's edge.

Earlier (0.2.2)
---------------
- Fixed: a Shadow Pokemon snagged from a trainer (Teddiursa at the HQ Lab) vanished after the battle
  instead of joining your party or PC box.
- Fixed: objects, people or the sky missing the first time you saw a place (fine after a restart). The
  launcher now prepares the game's shaders once for your PC when you choose the disc: the first time this
  takes a few minutes (progress bar on the Disc page; Play waits for it). After a graphics driver update
  or a new version it runs again.
- Faster on PCs with few processor cores (laptops): the game no longer keeps a whole core busy while it
  waits for the picture. Each play log now notes how hard the graphics chip works: if the game runs
  slowly, please send a report (F10) after a few minutes of play.
- Widescreen: menus and the battle boxes that sit at the screen's sides now sit at the sides of the wide
  picture; people at the wide sides no longer vanish; the opening's starry background is fixed.
- Reports exported from the launcher are about 8 times smaller.
- Settings: a new settings screen in the game's own style on the title screen, the game's own menu
  sounds, music fades while a settings page is open, and button pictures for Xbox / PlayStation
  controllers and the keyboard (Settings, Controls).

Earlier (0.2.1)
---------------
- Fixed: the game could freeze for good while drawing (a bug in the graphics library on Direct3D 12).
- Fixed: a crash when a menu was drawn while the game changed places.
- Fixed: a crash when a wild Pokemon fainted at the Cave Poke Spot (Spinda).
- Fixed: healing items such as Antidote cured the wrong conditions (Antidote cured burns).
- Fixed: one of the game's echo (reverb) effects was never switched on.
- Separate volumes for music, sound effects and Pokemon cries (Settings).
- The launcher's Reports page has "Save my last play session...": use it when the game froze or was
  closed without a report.
- The game's own data tables are now read from your disc instead of being built into the program.

What your PC needs
------------------
- Windows 10 or 11, 64-bit.
- A graphics card that supports Direct3D 12 (most cards of the last ten years). If Direct3D 12 doesn't work,
  the game tries Vulkan and then Direct3D 11 by itself; those are less tested. Without any of them the
  game can't show a picture.
- Older or laptop graphics cards are untested: please tell us how it runs on yours.

Your save and its backups
-------------------------
Each time the game saves, it first keeps a copy of your save as it was: the newest 10, in
%APPDATA%\Pokemon XD\save_backups. To go back to one, open the launcher's Save page, pick it under
"Backups" and press "Restore..." (with the game closed); the save it replaces is backed up first. Still,
copy the folder %APPDATA%\Pokemon XD\USA somewhere safe now and then.

Settings inside the game
------------------------
- In the field menu (POKeMON / P*DA / ITEMS / SAVE / EXIT), press down on EXIT: SETTINGS, then A.
- On the title screen's menu, press left on OPTIONS: SETTINGS, then A.
While the settings page is open the game is paused completely. Changes take effect at once and are kept
(the launcher's Settings page has them too). Alt+Enter switches full screen on and off.

Playing faster (not in the "Original" preset)
---------------------------------------------
- Fast-forward: hold Tab (or click the right stick of a PC controller) to run the game 4 times as
  fast. The key, hold/toggle and the speed (2x-16x) can be changed: launcher Controls page and the
  settings page. Fast-forward doesn't change the game: battles and everything else play out exactly as
  at normal speed, only quicker.
- Text speed: Normal, 2x, 3x or Instant.
- Fast battle animations: move animations run at fast-forward speed.
Runs that used these are marked in their reports, so please leave them on if you like: just say so.

When something goes wrong
-------------------------
- Press F10 at the moment you see it (wrong picture, wrong text, odd sound, stuck). It saves a report
  with a picture and the button presses that led there, so the problem can be replayed exactly.
- After a crash or a freeze a report is made by itself.
- Open the launcher's Reports page, pick the report, press "Export..." and post the .zip file in the
  Discord's bug-reports channel (https://discord.gg/XVbDVXH4Pn), with a sentence about what you were doing. "Hide my Windows user name" is on by default; leave the crash
  dump unticked unless you are asked for it.
- No report? (The game froze and you closed it, or it closed by itself.) Open the launcher's Reports
  page and press "Save my last play session...". It saves the last time you played as one .zip file:
  what the game wrote about itself, your button presses and your memory card. Post that file instead.
  You can also pick an older session from the list there.

Known issues in this build
--------------------------
- Timing is a few frames off the GameCube in some loads and scene starts (not visible in normal play;
  it matters for speedruns). The "Original" preset is not yet frame-exact.
- Sound is very close to the GameCube, but not bit-for-bit identical.
- Widescreen (an improvement, off in Original): people standing in the wide side areas keep still until
  they come back into the middle (the GameCube never animates them there); some lists and popups don't
  move to the sides yet. Please press F10 when something looks wrong.
- One tester got stuck at the HQ Lab when Professor Krane should hand over the Snag Machine (new game).
  We could not make it happen yet: if it happens to you, press F10 right there and send the report.
- If the game ever stops responding, it saves a report by itself after a minute (close the game then).
  Please send that report, or use the Reports page's "Save my last play session...".
- Many improvements in the Settings page say "not yet": they are planned and do nothing so far.

Developer menu (cheats)
-----------------------
For jumping ahead in the story or testing a place: Settings page, System tab, "Developer menu
(cheats)"; then F9 in the game. Runs that used it are marked in their reports. Not available with the
Original preset.
